package org.jpokerparser.gui.components;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.ImageIcon;
import javax.swing.JFrame;

public class OpacityCheckboxAction extends AbstractAction {
		private JFrame pf;
	    public OpacityCheckboxAction(JFrame pf) {	    	
	    	super("Change Transparency");
	    	this.pf = pf;
	    }
	    public void actionPerformed(ActionEvent e) {	
	    	
	    	if(com.sun.awt.AWTUtilities.getWindowOpacity(pf)==.2f) {
	    		com.sun.awt.AWTUtilities.setWindowOpacity(pf, 1f);	
	    	}else{
	    		com.sun.awt.AWTUtilities.setWindowOpacity(pf, .2f);
	    	}
	    	System.out.println("performed action");
	        //displayResult("Action for first button/menu item", e);
	    }
	}

